﻿using System;
using System.Collections.Generic;
using RayDen.Library.Core.Primitives;

namespace RayDen.Library.Entity.SceneGraph {
    public abstract class SceneGraphElement : ICloneable {
        public string Name;
        public int Id;
        public Transform ObjectToWorld, WorldToObject;
        public List<SceneGraphElement> Children;


        protected SceneGraphElement(Transform o2w, Transform w2o) {
            this.ObjectToWorld = o2w;
            this.WorldToObject = w2o;
            this.Children = new List<SceneGraphElement>();
        }

        public object Clone() {
            return this.CloneInternal();
        }

        public abstract object GetDataItem();

        protected abstract SceneGraphElement CloneInternal();
    }
}
